'use strict';
const db = uniCloud.database()
exports.main = async (event, context) => {
	const goodsIds = await db.collection('shopping_cart').where({
		openid: event.openid
	}).get()
	console.log(goodsIds)
	if (goodsIds.data.length == 0) {
		return {
			code: -1,
			msg: '没有查到该用户数据'
		}
	}
	return {
		code: 0,
		data: goodsIds.data[0].list,
		msg: '获取成功'
	}
};
